package com.bdzt.beidoubox.utils;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

/**
 * Author： 默小二
 * E-mail: dear_mic@yeah.net
 * Date:  2017/4/12 10:52.
 * Desc:
 */

public class NetUtils {
    public static boolean isConnect(Context context) {
        ConnectivityManager systemService = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo info = systemService.getActiveNetworkInfo();
        return  info != null &&info.isConnected();
    }
}
